<template>
  <div class="app-container">
    <el-card class="box-card">
      <el-form ref="form" :model="form" >
        <el-descriptions style="text-align: center" :column="3" border >
          <el-descriptions-item :contentStyle="contentStyle"label="问题名称" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
            <dict-tag :contentStyle="contentStyle" :options="dict.type.yh_issue_name" :value="form.issueName" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="问题属性" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
            <dict-tag :contentStyle="contentStyle":options="dict.type.yh_issue_type" :value="form.issueType" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="问题发现方式" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
            <dict-tag :contentStyle="contentStyle" :options="dict.type.yh_issue_discovery" :value="form.issueDiscovery" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="质量体系问题涉及过程" :span="1" label-class-name="my-label" :labelStyle="labelStyle2">{{form.involveProcess  }}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="统一社会信用代码" :span="1" label-class-name="my-label" :labelStyle="labelStyle2">{{form.creditCodes }}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="承制单位性质" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >{{ form.contractorUnitNature }}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="监管方式" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >{{ form.supervisionMethod }}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="发现问题JS代表" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
            <dict-tag :contentStyle="contentStyle" :options="dict.type.yh_found_problems" :value="form.foundProblems" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="计划归零时间" :span="1" label-class-name="my-label" :labelStyle="labelStyle2">{{form.plannedZeroTime }}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="监管JDB室" :span="1" label-class-name="my-label" :labelStyle="labelStyle">
            <dict-tag :contentStyle="contentStyle" :options="dict.type.yh_representative_office" :value="form.representativeOffice" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="处理牵头组织单位" :span="2" label-class-name="my-label" :labelStyle="labelStyle" >{{form.dealWithOrganization}}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="问题事实描述"  :span="3" label-class-name="my-label" :labelStyle="labelStyle1" >{{ form.problemFactDescription}}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="问题原因详述"  :span="3" label-class-name="my-label" :labelStyle="labelStyle1" >{{  form.causeDetails}}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="解决措施落实情况" :span="3"  label-class-name="my-label" :labelStyle="labelStyle1" >{{ form.settlementMeasures}}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="问题编号" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
            <dict-tag :contentStyle="contentStyle" :options="dict.type.yh_question_number" :value="form.questionNumber" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="问题直接原因类别" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
            <dict-tag :contentStyle="contentStyle" :options="dict.type.yh_direct_cause_category" :value="form.directCauseCategory" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="问题模式" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
            <dict-tag :contentStyle="contentStyle" :options="dict.type.yh_problem_model" :value="form.problemModel" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="承制单位代号" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >{{form.contractorUnitCode }}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="承制单位所属部门" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >{{ form.contractorDepartment }}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="JDBJJ印章序号" :span="1" label-class-name="my-label" :labelStyle="labelStyle2" >
            <dict-tag :options="dict.type.yh_representative_office_seal_number" :value="form.representativeOfficeSealNumber" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="发现问题日期" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >{{ form.discoveryDate}}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="监管JDB局" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >{{form.representativeBureau }}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="问题处理JS代表" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >{{ form.problemSolving}}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="问题归零情况" :span="1" label-class-name="my-label" :labelStyle="labelStyle2" >
            <dict-tag :options="dict.type.yh_problem_zero" :value="form.problemZero" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="是否拉条挂账" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
            <dict-tag :options="dict.type.latiao" :value="form.hangAccount" /></el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="内外场区别" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
            <dict-tag :contentStyle="contentStyle" :options="dict.type.inout" :value="form.differenceFields" />
          </el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="质量问题级别" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >
            <dict-tag :contentStyle="contentStyle" :options="dict.type.jibie" :value="form.problemLevel" />
          </el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="责任人" :span="1" label-class-name="my-label" :labelStyle="labelStyle" >{{ form.personLiable }}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="责任单位" :span="1" label-class-name="my-label" :labelStyle="labelStyle">{{ form.responsibleUnit}}</el-descriptions-item>
          <el-descriptions-item :contentStyle="contentStyle" label="备注" :span="3" label-class-name="my-label" :labelStyle="labelStyle2">{{ form.remark}}</el-descriptions-item>
        </el-descriptions>
      </el-form>

      <br/>
      <div style="float:right; margin-bottom: 15px;">
        <el-button @click="viewCancel">返 回</el-button>
      </div>
    </el-card>
  </div>
</template>
<!--<style lang="scss" scoped>
                   ::v-deep .my-label{
                     background: #FFFFFF;
                   }
</style>-->
<script>


import {  getDailyquality,} from "@/api/module/dr/dailyquality";
import { treeselect } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import watermark from "watermark-dom";
  export default {
    name: "DailyQualityDetail",
    components: {
      Treeselect
    },
    dicts: ['yh_issue_name','yh_issue_type','yh_issue_discovery','yh_question_number','yh_problem_model','yh_found_problems','yh_direct_cause_category','yh_representative_office_seal_number','yh_problem_zero'
    ,'jibie','inout','latiao','guiling','yh_representative_office'],
    data() {
      return {
        contentStyle:{
          'width':'200px'
        },
        form:{},
        labelStyle: { 'width': '8%','color': '#000000','text-align': 'right', },
        labelStyle1: { 'width': '10%','color': '#000000','text-align': 'right', },
        labelStyle2: { 'width': '10%','color': '#000000','text-align': 'right', },
        // 遮罩层
        loading: true,
        // 选中数组
        ids: [],
        // 非单个禁用
        single: true,
        // 非多个禁用
        multiple: true,
        // 显示搜索条件
        showSearch: false,
        // 总条数
        total: 0,
        // 部门树选项
        deptOptions: undefined,
        // 合同资料表格数据
        fileList: [],
        // 弹出层标题
        title: "",
        // 是否显示弹出层
        open: false,
      // 查询参数
     /* queryParams: {
        pageNum: 1,
        pageSize: 10,
        issueName: null,
        issueType: null,
        issueDiscovery: null,
        involveProcess: null,
        creditCodes: null,
        contractorUnitNature: null,
        supervisionMethod: null,
        foundProblems: null,
        plannedZeroTime: null,
        representativeOffice: null,
        dealWithOrganization: null,
        problemFactDescription: null,
        causeDetails: null,
        settlementMeasures: null,
        questionNumber: null,
        directCauseCategory: null,
        problemModel: null,
        contractorUnitCode: null,
        contractorDepartment: null,
        representativeOfficeSealNumber: null,
        discoveryDate: null,
        representativeBureau: null,
        problemSolving: null,
        problemZero: null,
        createBy: null,
        createTime: null,
        updateBy: null,
        updateTime: null,
        remark: null,
        note1: null,
        note2: null,
        note3: null,
        note4: null,
        note5: null,
        note6: null,
        note7: null,
        note8: null,
        note9: null,
        note10: null
      }*/
      };
    },
    mounted() {
      watermark.load({ watermark_txt: "  "   });
    },
    created() {
      const id = this.$route.query.id;
      if (id) {
        // 获取表详细信息

        getDailyquality(id).then(res => {

          this.form = res.data;

        });

      }
    },
    methods: {


      /** 关闭按钮 */
      viewCancel() {
        const id = this.$route.query.id;
        getDailyquality(id).then(response => {
          this.form = response.data;

        });
        const obj = { path: "/yewu/drdailyquality", query: {id} };
        this.$tab.closeOpenPage(obj);
      }
    },
    /** 查询部门下拉树结构 */
    getTreeselect() {
      treeselect().then(response => {
        this.deptOptions = response.data;
      });
    }
  };
</script>






